package org.example.feign;

import org.example.domain.MemberAddr;
import org.example.domain.Sku;
import org.example.feign.sentinel.OrderMemberFeignSentinel;
import org.example.model.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


//订单业务模块调用会员业务模块Feign接口
@FeignClient(value = "member-service",contextId = "OrderMemberClient" , fallback = OrderMemberFeignSentinel.class)
public interface OrderMemberFeign {

    @GetMapping("/p/address/getMemberAddrById" )
    public Result<MemberAddr> getMemberAddrById(@RequestParam Long addrId);

    @GetMapping("/p/address/getMemberDefaultAddrByOpenId")
    public Result<MemberAddr> getMemberDefaultAddrByOpenId(@RequestParam String openId);

    @GetMapping("/admin/user/getNickNameByOpenId")
    public Result<String> getNickNameByOpenId(@RequestParam String openId);

}
